<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{{title}}</title>
  <link rel="stylesheet" href="/public/css/style.css">
</head>
<body>

  <div class="container">

    <h1 class="heading">{{title}}</h1>

    <div class="tools">
      <a href="/" class="btn">返回列表</a>
    </div>
  
    <form action="/update" method="post" autocomplete="off" onsubmit="return checkSubmit()">
      <input type="hidden" name="id" value="{{row.id}}">
      <input type="hidden" name="page" value="{{page}}">
      <input type="hidden" name="keyword" value="{{keyword}}">
      <table class="table form">
        <tr>
          <th>水果缩图</th>
          <td>
            <label class="upload">
              <input type="file" onchange="upload(this)">
              <img src="{{row.thumb}}">
              <input name="thumb" type="hidden" value="{{row.thumb}}">
            </label>
          </td>
        </tr>
        <tr>
          <th>水果名称</th>
          <td><input name="name" type="text" class="input" placeholder="请输入名称" value="{{row.name}}"></td>
        </tr>
        <tr>
          <th>水果单价</th>
          <td><input name="price" type="number" class="input" placeholder="请输入单价" value="{{row.price}}"></td>
        </tr>
        <tr>
          <th></th>
          <td>
            <button type="submit" class="btn">确认</button>
            <button type="reset" class="btn">重置</button>
          </td>
        </tr>
      </table>
    </form>
  </div>

  <script src="/public/js/main.js"></script>
</body>
</html>